# Maintainer: Fabian Bornschein <fabiscafe-at-mailbox-dot-org>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-music
pkgver=45.0
pkgrel=1
epoch=1
pkgdesc="Music player and management application"
url="https://wiki.gnome.org/Apps/Music"
arch=(any)
license=(GPL)
depends=(
  grilo
  grilo-plugins
  gst-plugins-base
  gst-plugins-good
  gtk4
  libadwaita
  libmediaart
  python-cairo
  python-gobject
  tracker3-miners
)
makedepends=(
  appstream-glib
  git
  gobject-introspection
  meson
  yelp-tools
)
optdepends=(
  'gst-libav: Extra media codecs'
  'gst-plugins-bad: Extra media codecs'
  'gst-plugins-ugly: Extra media codecs'
)
groups=(gnome)
_commit=2f34438a1609ccd51bc054c154e845627156689f  # tags/45.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-music.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"

  python -m compileall -d /usr/lib "$pkgdir/usr/lib"
  python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
}

# vim:set sw=2 sts=-1 et:
